package com.recource.util;

import lombok.Data;

/**
 * @author yujie
 * @createTime 2022/11/23 14:30
 * @description
 */
@Data
public class Result<T> {

    private T data;

    private String msg;

    private Integer code;

    public Result(T data){
        this.msg = "ok";
        this.code = 200;
        this.data = data;
    }

    public Result(){

    }

    public static  <T> Result<T> ok(T t){
        return new Result<>(t);
    }

}
